
package main;

import model.ClientModel;
import utils.Constants;
import view.ClientView;
import controller.ClientController;

public class ClientMain {
    
    public static void main(String[] args) {
        if (checkArgs(args)) {
            ClientModel clientModel = new ClientModel(args[0], Integer.parseInt(args[1]));
            ClientView clientView = new ClientView();
            ClientController clientController = new ClientController(
                    clientModel, clientView);
            clientController.start();
        } else {
            System.out.println(Constants.ERROR_CLIENT_ARGS);
        }
    }
    
    private static boolean checkArgs(String[] args) {
        if (args.length == 2) {
            return true;
        } else {
            return false;
        }
    }
    
}
